package com.bw.ppjokeplay.mvvm.model.find

import com.bw.ppjokeplay.commen.entity.BaseEntity
import com.bw.ppjokeplay.commen.mvvm.model.BaseModel
import com.bw.ppjokeplay.commen.network.Api
import com.bw.ppjokeplay.commen.network.ApiServer
import com.bw.ppjokeplay.mvvm.model.entity.AddTagFollowEntity
import com.bw.ppjokeplay.mvvm.model.entity.TagEntity
import io.reactivex.Observable

/**
 * @author Lishaohe
 * @description:
 * @date :2021/11/13 0013 上午 8:40
 *
 */
class FindRecommendModel : BaseModel() {
    fun requestrecommendList(
        offset:Int,
        pageCount:Int,
        tagId:Int,
        tagType:String,
        userId:Int
    ): Observable<BaseEntity>?{
        val homeOB: Observable<TagEntity> =
            ApiServer.instance().getRetrofit()!!.create(Api::class.java)
                .requestTagList(offset, pageCount, tagId, tagType, userId)
        return changeFun(homeOB)
    }
    fun requestAddTagList(
        tagId:Int,
        userId:Int
    ): Observable<BaseEntity>?{
        val homeOB: Observable<AddTagFollowEntity> =
            ApiServer.instance().getRetrofit()!!.create(Api::class.java)
                .requestAddTagList(tagId, userId)
        return changeFun(homeOB)
    }
}